// =============================================================
// CScript
// ---------------------------------------
// Author : Woo-Hyun Kim
// Email : woorung@icu.ac.kr or woorung@nhncorp.com
// Date : Jul. 10, 2006
// =============================================================
#ifndef CScriptH
#define CScriptH
//-----------------------------------------------------------------
#include <iostream>
#include <iterator>
#include <vector>
#include <list>
#include <map>
#include <algorithm>
#include <fstream>
#include <string>

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>

using namespace std;
//---------------------------------------------------------------
class CScript {
protected :
	// because of potential error of putenv()
	char *global_environment_variable;

	map<string,string> default_params;
public :
	CScript();
	~CScript();

	string &replaceText(string &text, const char *pttr, const char *new_val);
	string &replaceVariable(string &text, string &pttr, string &new_val);
	string &replaceImmediateCommand(string &imm_cmd, string &begin_mark);
	string &executeShellCommand(string &command);
};
//----------------------------------------------------------------
#endif
